<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head><title>DevIL Documentation, ilLoadImage</title></head><body topmargin="0" bgcolor="white"><font face="verdana"><img src="../images/DevIL.gif"><br></font>
<style type="text/css">
A.color{color: FFFFFF;text-decoration: none;}
</style>



<table width="100%" cols="2" border="0" bgcolor="navy"><tr align="left"><td align="left"><font color="white">DevIL Documentation</font></td><td align="right"><font color="white">
<a class="color" href="ilLoadF.html">Previous</a> |
<a class="color" href="index.html">IL</a> |
<a class="color" href="ilLoadL.html">Next</a>
</font></td></tr></table><br/><table><tr><td>&nbsp;</td><td>
<p><h3>ilLoadImage</h3></p><table><tr><td>&nbsp;</td><td>
<p><font size="-1">The ilLoadImage function allows a general interface to the specific internal file-loading routines. The approach ilLoadImage takes toward determining image types is three-pronged. First, it finds the extension and checks to see if any user-registered functions (registered through ilRegisterLoad) match the extension. If nothing matches, it takes the extension and determines which function to call based on it. Lastly, it attempts to identify the image based on various image header verification functions, such as ilIsValidPngF. If all this checking fails, IL_FALSE is returned with no modification to the current bound image.</font></p>
<table><tr><td>&nbsp;</td><td><p><pre><code><b>ILboolean ilLoadImage(<br/></b>&nbsp;&nbsp;<b>char *</b> <i>FileName</i> <b>);</b></code></pre></p></dl></p></td></tr></table>
<br/><p><h4>Parameters</h4><table><tr><td>&nbsp;</td><td><dl><dt><i><font size="-1">FileName</font></i></font></dt><dd><font size="-1">Specifies which file to load an image from.</font></dd></dl></p></td></tr></table><br/><h4>Errors</h4><table><tr><td>&nbsp;</td><td><dl><dt><a href="../IL/IL_COULD_NOT_OPEN_FILE.html"><font size="-1">IL_COULD_NOT_OPEN_FILE</font></a></dt><dd><font size="-1">The file pointed to by FileName could not be opened. Either the file does not exist or may be in use by another process.</font></dd>
<dt><a href="../IL/IL_ILLEGAL_OPERATION.html"><font size="-1">IL_ILLEGAL_OPERATION</font></a></dt><dd><font size="-1">The operation attempted is not allowable in the current state. The function returns with no ill side effects. Generally there is currently no image bound or it has been deleted via ilDeleteImages. You should use ilGenImages and ilBindImage before calling the function.</font></dd>
<dt><a href="../IL/IL_INVALID_EXTENSION.html"><font size="-1">IL_INVALID_EXTENSION</font></a></dt><dd><font size="-1">The file could not be loaded based on extension or header.</font></dd>
<dt><a href="../IL/IL_INVALID_PARAM.html"><font size="-1">IL_INVALID_PARAM</font></a></dt><dd><font size="-1">FileName was not valid. It was most likely NULL.</font></dd>
<dt><a href="../IL/IL_OUT_OF_MEMORY.html"><font size="-1">IL_OUT_OF_MEMORY</font></a></dt><dd><font size="-1">Could not allocate enough memory for the image data.</font></dd>
</dl></td></tr></table></p>
<h4>See Also</h4><table><tr><td>&nbsp;</td><td><dl><a href="../IL/ilBindImages.html"><font size="-1">ilBindImages</font></a>, 
<a href="../IL/ilGenImages.html"><font size="-1">ilGenImages</font></a>, 
<a href="../IL/ilLoad.html"><font size="-1">ilLoad</font></a>, 
<a href="../IL/ilLoadF.html"><font size="-1">ilLoadF</font></a>, 
<a href="../IL/ilLoadL.html"><font size="-1">ilLoadL</font></a>, 
<a href="../IL/ilLoadPal.html"><font size="-1">ilLoadPal</font></a>, 
</td></tr></table></p>
</td></tr></table>



<br/></body></html>
